package com.dashang.feecenter.service.impl;

import com.dashang.feecenter.bean.FeeAllotBean;
import com.dashang.feecenter.dao.CommonMapper;
import com.dashang.feecenter.service.FeeAllotService;
import com.dashang.feecenter.util.common.CommonUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 费用下拨
 *
 * @author Yulongyu
 * @since 2019/06/12
 */
@Service
@Slf4j
public class FeeAllotServiceImpl implements FeeAllotService {

    @Autowired
    private CommonMapper commonMapper;

    @Autowired
    private CommonUtil commonUtil;

    @Override
    @Transactional(rollbackFor = {Exception.class})
    public FeeAllotBean processFeeAllot(String id) {
        FeeAllotBean bean1 =  commonMapper.getTrprescriptionById(id);
        return bean1;
    }

    @Override
    public List<FeeAllotBean> processFeeAllotList(String id) {
        List<FeeAllotBean> bean1 =  commonMapper.getTrprescriptionListById(id);
        return bean1;
    }
}

